#ifndef KEY_VALUE_DB_H
#define KEY_VALUE_DB_H

#include <string>

using namespace std;


class KeyValueDB {
public:
	static KeyValueDB *create(string type, string path);
	virtual ~KeyValueDB(){};

	virtual int open() = 0;
	virtual int close() = 0;
	
	virtual int set(string &key, string *value) = 0; //create or update
	virtual int get(string &key, string *value) = 0;
	virtual int remove(string &key) = 0;

	virtual int multi_remove(string &key_prefix) = 0; /* delete non-empty file */

};


#endif
